import { createStore, useStore as baseUseStore } from "vuex";

import keepAliveNames from "./modules/keepAliveNames";
import requestOldRoutes from "./modules/requestOldRoutes";
import routesList from "./modules/routesList";
import tagsViewRoutes from "./modules/tagsViewRoutes";
import themeConfig from "./modules/themeConfig";
import userInfos from "./modules/userInfos";

import permission from "./modules/permission";
import getters from "./getters";

export const key = Symbol();

export const store = createStore({
  modules: {
    keepAliveNames,
    requestOldRoutes,
    routesList,
    tagsViewRoutes,
    themeConfig,
    userInfos,
    permission,
  },
  getters,
});

export function useStore() {
  return baseUseStore();
}

/** 
const store = createStore({
  modules: {
    keepAliveNames,
    requestOldRoutes,
    routesList,
    tagsViewRoutes,
    themeConfig,
    userInfos,
  },
  getters,
});
export default store;
*/

/**
export default createStore({
  state: {},
  mutations: {},
  actions: {},
  modules: {},
});
*/
